From 55c5cfb9b44769e04739cbfccb8dd88198f6af23 Mon Sep 17 00:00:00 2001 From: "kaf24@firebug.cl.cam.ac.uk" Date: Mon, 13 Feb 2006 12:16:16 +0100 Subject: [PATCH] Absolutely must not return to HVM guest context until synchronous I/O emulation is completed. Signed-off-by: Keir Fraser --- xen/arch/x86/hvm/svm/vmcb.c | 3 ++- xen/arch/x86/hvm/vmx/io.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/xen/arch/x86/hvm/svm/vmcb.c b/xen/arch/x86/hvm/svm/vmcb.c index 996c4deaa1..6c56e58127 100644 --- a/xen/arch/x86/hvm/svm/vmcb.c +++ b/xen/arch/x86/hvm/svm/vmcb.c @@ -489,7 +489,8 @@ void svm_do_resume(struct vcpu *v) { struct hvm_virpit *vpit = &v->domain->arch.hvm_domain.vpit; - if ( event_pending(v) ) + if ( event_pending(v) || + test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) ) hvm_wait_io(); /* pick up the elapsed PIT ticks and re-enable pit_timer */ diff --git a/xen/arch/x86/hvm/vmx/io.c b/xen/arch/x86/hvm/vmx/io.c index ac2a6b60c5..b36ceb15f6 100644 --- a/xen/arch/x86/hvm/vmx/io.c +++ b/xen/arch/x86/hvm/vmx/io.c @@ -177,7 +177,8 @@ void vmx_do_resume(struct vcpu *v) vmx_stts(); - if ( event_pending(v) ) + if ( event_pending(v) || + test_bit(ARCH_HVM_IO_WAIT, &v->arch.hvm_vcpu.ioflags) ) hvm_wait_io(); /* pick up the elapsed PIT ticks and re-enable pit_timer */ -- 2.30.2